using System;
using System.Collections.Generic;
using System.Text;

using Weazel.Microblaze.Simulator.Engine;

namespace Weazel.Microblaze.Simulator.Components.Microblaze.Instructions
{
    public class Nop : Instruction
    {
        public override int CycleCount
        {
            get { return 1; }
        }

        public Nop()
            : base("nop")
        {
        }

        public override void Set(uint address, uint value)
        {
            base.Set(address, value);
            System.Diagnostics.Debug.Assert(value == 0);
        }

        public override void Execute(MicroblazeComponent MicroblazeComponent)
        {
            throw new DecodeException(Address, Value, ToString());
        }

        public override string ToString()
        {
            return "nop";
        }
    }
}
